assert_that(p.cargo_process("build").arg("-v"),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] test v0.0.0 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \
+[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
-C opt-level=1 \
-C debug-assertions=on \
-C metadata=[..] \
assert_that(p.cargo_process("build").arg("-v"),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] test v0.0.0 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \
+[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
-g \
-C metadata=[..] \
--out-dir [..] \
assert_that(p.cargo_process("build").arg("-v"),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] test v0.0.0 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \
+[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
-C opt-level={level} \
-g \
-C debug-assertions=on \
assert_that(p.cargo_process("build").arg("-v").arg("--release"),
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.0.0 ({url}/foo)
-[RUNNING] `rustc foo[/]src[/]lib.rs --crate-name foo \
+[RUNNING] `rustc --crate-name foo foo[/]src[/]lib.rs \
--crate-type dylib --crate-type rlib -C prefer-dynamic \
-C opt-level=1 \
-g \
--emit=dep-info,link \
-L dependency={dir}[/]target[/]release[/]deps`
[COMPILING] test v0.0.0 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \
+[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \
-C opt-level=1 \
-g \
-C metadata=[..] \
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] foo v0.0.1 ({dir})
-[RUNNING] `rustc src[/]lib.rs [..]`
-[RUNNING] `rustc src[/]bin[/]a.rs [..]`
+[RUNNING] `rustc [..] src[/]lib.rs [..]`
+[RUNNING] `rustc [..] src[/]bin[/]a.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[/]debug[/]a[EXE]`", dir = path2url(p.root())))
.with_stdout("\
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.0.1 ([..])
-[RUNNING] `rustc src[/]bin[/]b.rs [..]`
+[RUNNING] `rustc [..] src[/]bin[/]b.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[/]debug[/]b[EXE]`")
.with_stdout("\
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] bar v0.0.1 ({url}/bar)
-[RUNNING] `rustc bar[/]src[/]bar.rs --crate-name bar --crate-type lib \
+[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \
-C opt-level=3 \
-C metadata=[..] \
--out-dir {dir}[/]target[/]release[/]deps \
--emit=dep-info,link \
-L dependency={dir}[/]target[/]release[/]deps`
[COMPILING] foo v0.0.1 ({url})
-[RUNNING] `rustc examples[/]a.rs --crate-name a --crate-type bin \
+[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \
-C opt-level=3 \
-C metadata=[..] \
--out-dir {dir}[/]target[/]release[/]examples \
execs().with_status(0)
.with_stderr(&format!("\
[COMPILING] bar v0.0.1 ({url}/bar)
-[RUNNING] `rustc bar[/]src[/]bar.rs --crate-name bar --crate-type lib \
+[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \
-g \
-C metadata=[..] \
--out-dir {dir}[/]target[/]debug[/]deps \
--emit=dep-info,link \
-L dependency={dir}[/]target[/]debug[/]deps`
[COMPILING] foo v0.0.1 ({url})
-[RUNNING] `rustc examples[/]a.rs --crate-name a --crate-type bin \
+[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \
-g \
-C metadata=[..] \
--out-dir {dir}[/]target[/]debug[/]examples \
.with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \
+[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \
-C metadata=[..] \
--out-dir [..] \
--emit=dep-info,link \
.with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \
+[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \
-C debug-assertions=off \
-C metadata=[..] \
--out-dir [..] \
.with_status(0)
.with_stderr(&format!("\
[COMPILING] {name} v{version} ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name {name} --crate-type lib -g \
+[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib -g \
-C metadata=[..] \
--out-dir [..] \
--emit=dep-info,link \
-L dependency={dir}[/]target[/]debug[/]deps`
-[RUNNING] `rustc src[/]main.rs --crate-name {name} --crate-type bin -g \
+[RUNNING] `rustc --crate-name {name} src[/]main.rs --crate-type bin -g \
-C debug-assertions \
-C metadata=[..] \
--out-dir [..] \
.with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \
+[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \
-C metadata=[..] \
--out-dir [..]`
-[RUNNING] `rustc src[/]bin[/]bar.rs --crate-name bar --crate-type bin -g \
+[RUNNING] `rustc --crate-name bar src[/]bin[/]bar.rs --crate-type bin -g \
-C debug-assertions [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = p.url())));
.with_status(0)
.with_stderr(format!("\
[COMPILING] foo v0.0.1 ({url})
-[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \
+[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \
-C metadata=[..] \
--out-dir [..]`
-[RUNNING] `rustc tests[/]bar.rs --crate-name bar -g \
+[RUNNING] `rustc --crate-name bar tests[/]bar.rs -g \
-C debug-assertions [..]--test[..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
", url = p.url())));
assert_that(p.cargo_process("test").arg("-v").arg("hello"),
execs().with_stderr(format!("\
[COMPILING] foo v0.5.0 ({url})
-[RUNNING] `rustc src[/]foo.rs [..]`
+[RUNNING] `rustc [..] src[/]foo.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]target[/]debug[/]deps[/]foo-[..][EXE] hello`", url = p.url()))
.with_stdout("
[..]
[..]
[..]
-[RUNNING] `rustc [..] --crate-name ex [..] --extern a=[..]`
+[RUNNING] `rustc --crate-name ex [..] --extern a=[..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.0.1 ([..])
-[RUNNING] `rustc src[/]main.rs [..]`
-[RUNNING] `rustc src[/]main.rs [..]`
+[RUNNING] `rustc [..] src[/]main.rs [..]`
+[RUNNING] `rustc [..] src[/]main.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}
.arg("--features").arg("a").arg("-p").arg("a"),
execs().with_status(0).with_stderr("\
[COMPILING] a v0.0.1 ([..])
-[RUNNING] `rustc a[/]src[/]lib.rs [..]`
-[RUNNING] `rustc a[/]src[/]lib.rs [..]`
+[RUNNING] `rustc [..] a[/]src[/]lib.rs [..]`
+[RUNNING] `rustc [..] a[/]src[/]lib.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
"));
}